<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="plug/webuploader/webuploader.css" />
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/util.css" />
<link rel="stylesheet" href="css/collect.css" />
<title>医院订单详情</title>
<style>
/*添加图片样式自定义*/
	#filePicker{
		display: inline-block;
		/*border: 1px solid red;*/
		height: 40px;
	}
	#filePicker .webuploader-pick{
		height: 40px;line-height: 40px;
		width: 120px;
		/*border: 1px solid black;*/
		padding: 0;
		letter-spacing: 1px;
		font-size: 16px;
		border-radius:5px ;
	}
	.preview>div{
		display: inline-block;
		margin-left: 3px;
	}
	
	
.order_detail .public_input{
	margin: 10px 0;
}
.public_input input{
	border: 1px solid transparent;
}
</style>
</head>
<body>
<div class="content order_detail">
	<div class="navigate_head clearfix">
		<p onclick="window.location.href='order_list.html'">订单列表</p>
		<p class="navi_current" onclick="window.location.href='order_detail.html'">订单详情</p>
		<p class="navi_null"></p>
	</div>
	<div>
		<form class="add_ill_form">
			<div class="public_input" style="margin: 10px 0;">
				<span>订单号:</span>
				<input type="text" class="order_num" placeholder=""/>
			</div>
			<div class="public_input">
				<span>患者姓名:</span>
				<input type="text" class="patient_name" placeholder=""/>
			</div>
			<div class="public_input">
				<span>性别:</span>
				<input type="text" class="sex" placeholder=""/>
			</div>
			<div class="public_input">
				<span>手机号:</span>
				<input type="text" class="mobile" placeholder=""/>
			</div>
			<div class="public_input">
				<span>项目名:</span>
				<input type="text" class="ill_name" placeholder=""/>
			</div>
	
			<div class="public_input">
				<span>约定费用(元):</span>
				<input type="text" class="appoint_cost" placeholder=""/>
			</div>
			<div class="public_input">
				<span>约定周期(天):</span>
				<input type="text" class="appoint_time" placeholder=""/>
			</div>
		
			<div class="public_input clearfix" style="height: auto;width: 837px;">
				<span style="position: absolute;top: 0;"><span class="font_green">* </span>约定效果:</span>
				<div class="appoint_result_list">
					<p>
						<span>1.</span><input type="text" class="appoint_result" placeholder="如" />
						<span class="font_green" onclick="addResult(this)">[+]</span>
					</p>
				</div>
			</div>
			<div class="public_input clearfix" style="height: auto;width: 837px;">
				<span style="position: absolute;top: 0;"><span class="font_green">* </span>谅解:</span>
				<div class="forgive_list">
					<p>
						<span>1.</span><input type="text" class="forgive" placeholder="如" />
						<span class="font_green" onclick="addForgive(this)">[+]</span>
					</p>
				</div>
			</div>
			<!--<div class="public_input">
				<span>诊断:</span>
				<input type="text" class="diagnose" placeholder=""/>
			</div>
			<div class="public_input">
				<span>就诊时间:</span>
				<input type="text" class="cure_time" placeholder=""/>
			</div>
			<div class="public_input">
				<span>订单状态:</span>
				<input type="text" class="order_status" placeholder=""/>
			</div>-->
		</form>
	</div>
</div>
	
	
<script type="text/javascript" src="plug/jquery-1.11.3.js" ></script>
<script type="text/javascript" src="plug/template-web.js" ></script>
<script type="text/javascript" src="plug/webuploader/webuploader.min.js"></script>
<script type="text/javascript" src="js/toggle.js" ></script>
<script type="text/javascript" src="js/util.js" ></script>
<script type="text/javascript" src="js/method.js" ></script>
<script type="text/javascript" src="js/addTag.js" ></script>
<script type="text/javascript" src="js/detail/upload_img.js" ></script>
<script>
$(function(){
	$(".public_input input").attr("disabled","disabled");
	var setTime = setTimeout(function(){
		console.log($(".appoint_result_list>p .font_green,.forgive_list>p .font_green"));
		$(".appoint_result_list>p .font_green,.forgive_list>p .font_green").hide();
	},500);
	//初始化表单控件
	var data = {
		"id":$.get_storage("orderId")
	}
	$.get_ajax("/hospital/order/getDetail.json",data,function(res){
		console.log(res);
		if(res.success){
			$(".order_num").attr("value",res.data.sn);
			$(".patient_name").attr("value",res.data.fullname);
			if(res.data.sex=="man"){
				res.data.sex="男"
			}else{
				res.data.sex="女"
			}
			$(".sex").attr("value",res.data.sex);
			$(".mobile").attr("value",res.data.mobile);
			$(".ill_name").attr("value",res.data.projectName);
//			$(".ill_class").attr("value",res.data.minPrice);
//			$(".cure_method").attr("value",res.data.treatmentMethod);//治疗方式
			
			$(".appoint_cost").attr("value",res.data.amount);
			$(".appoint_time").attr("value",res.data.day);
			//约定效果
			addTag.init_appoint_result(res.data.orderAgreementResult,$(".appoint_result_list"));
			//约定谅解
			init_forgive(res.data.orderUnderstanding,$(".forgive_list"));
//			$(".diagnose").attr("value",res.data.diagnosis);//症断
//			
//			$(".cure_time").attr("value",res.data.createDate);
//			if(res.data.orderStatus=="waitPaid"){
//				res.data.orderStatus = "待支付";
//			}
//			if(res.data.orderStatus=="waitConfirm"){
//				res.data.orderStatus = "待确认";
//			}
//			if(res.data.orderStatus=="completed"){
//				res.data.orderStatus = "完成";
//			}
//			$(".order_status").attr("value",res.data.orderStatus);
		}
	});
});
</script>
<script>

</script>
</body>
</html>
